/**
 * @author zulianp@lu.unisi.ch &  lemmar@lu.unisi.ch
 */
package ch.unisi.inf.projects.java.uom.gui.commands;

import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;

import javax.swing.KeyStroke;

public final class QuitCommand extends Command
{
	/** We are not going to serialize this class atm */
	private static final long serialVersionUID = -1L;
	
	
	public QuitCommand()
	{
		putValue(NAME,"Quit");
		putValue(SHORT_DESCRIPTION, "Exits the program");
		putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_Q, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));
		
	}
	
    public void actionPerformed (final ActionEvent ev)
    {
        System.exit(0);
    }
    
}
